<%inherit file="/base.mako"/>
${h.link_to('List', h.url_for(action='index', id=None))}
<br/>
${h.form(h.url(action='save_add'), method='post', multipart=True)}
${h.hidden_field('category_id', value=c.category.id)}
Name: ${h.text_field('name')}
<br/>
Brand: ${h.select('brand_id',  h.format_options(c.brands, value_prop='id', caption_prop='name', add_empty=True))}
<br/>
Image:  ${h.file_field('main_image')} <br />
Description: ${h.text_area('description')}
<br/>
% for item in c.category.properties:
${item.code}: ${h.text_field('$prop.' + item.code)}
<br/>
% endfor
            ${h.submit(u'Add')}
${h.end_form()}